home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / X11 / config / Win32.rules < prev    next >
Text File  |  2006-04-12  |  16KB  |  532 lines

  1. XCOMM platform:  $Xorg: Win32.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
  2.  
  3.  
  4.  
  5.  
  6. XCOMM $XFree86$
  7.  
  8. #define HasSharedLibraries YES
  9. #define NeedLibInsideFlag YES
  10. #define SharedLibXaw NO
  11. #define SharedLibXmu NO
  12. #define SharedLibXt NO
  13. #define SharedDataSeparation NO
  14. #define SharedCodeDef /**/
  15. #define SharedLibraryDef /**/
  16. #define ShLibIncludeFile <WinLib.tmpl>
  17. #define SharedLibraryLoadFlags -dll
  18. #define PositionIndependentCFlags /**/
  19.  
  20. .c.obj:
  21.     $(CC) -c $*.c @<<
  22.     $(CFLAGS)
  23. <<
  24.  
  25. #if HasCplusplus
  26. .CCsuf.obj:
  27.     $(CXX) -c $*.CCsuf @<<
  28.     $(CFLAGS)
  29. <<
  30. #endif
  31.  
  32. #define ProgramTargetName(target) target.exe
  33.  
  34. #define RunProgram(progvar,options) $(progvar:/=\) options
  35.  
  36. #define RemoveFile(file) if exist file $(RM) file
  37.  
  38. #define RemoveFiles(files) @$(MAKE) $(MFLAGS) -f <<            @@\
  39. .SUFFIXES:                                @@\
  40.                                     @@\
  41. all: files                                @@\
  42.     !for %%i in ( Avoid.Error $$** ) do if exist %%i $(RM) %%i    @@\
  43.                                     @@\
  44. Avoid.Error files:                            @@\
  45. <<
  46.  
  47. #define MakeDir(dir) -$(MKDIRHIER) dir
  48.  
  49. #define ObjectCompile(options) RemoveFile($@)                @@\
  50.     $(CC) -c $*.c @<<                        @@\
  51.     $(CFLAGS) options                        @@\
  52. <<
  53.  
  54. #define LibObjCompile(dir,options) RemoveFiles($@ dir\$@)        @@\
  55.     $(CC) -c  $*.c @<<                        @@\
  56.     $(CCOPTIONS) $(ALLDEFINES) options                @@\
  57. <<                                    @@\
  58.     $(MV) $@ dir\$@
  59.  
  60. #define BuildIncludesTop(srclist,dstsubdir,dstupdir)            @@\
  61. includes:: srclist                            @@\
  62.     MakeDir($(BUILDINCDIR:/=\))                    @@\
  63.     @$(MAKE) $(MFLAGS) -f <<                    @@\
  64. .SUFFIXES:                                @@\
  65.                                     @@\
  66. all: srclist                                @@\
  67.     cd $(BUILDINCDIR:/=\)                        @@\
  68.     !RemoveFile($$**)                        @@\
  69.     !$(LN) $(BUILDINCTOP:/=\)\$(CURRENT_DIR:/=\)\$$** .        @@\
  70.                                     @@\
  71. Avoid.Error srclist:                            @@\
  72. <<
  73.  
  74. #define BuildIncludes(srclist,dstsubdir,dstupdir)            @@\
  75. XVARdef0 = $(BUILDINCDIR)/dstsubdir                    @@\
  76. XVARdef1 = $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR)            @@\
  77.                                     @@\
  78. includes:: srclist                            @@\
  79.     MakeDir($(XVARuse0:/=\))                    @@\
  80.     @$(MAKE) -A $(MFLAGS) -f <<                    @@\
  81. .SUFFIXES:                                @@\
  82.                                     @@\
  83. all: srclist                                @@\
  84.     cd $(XVARuse0:/=\)                        @@\
  85.     !RemoveFile($$**)                        @@\
  86.     !$(LN) $(XVARuse1:/=\)\$$** .                    @@\
  87.                                     @@\
  88. Avoid.Error srclist:                            @@\
  89. <<
  90.  
  91. #define LinkFileList(step,list,dir,sub)                    @@\
  92. XVARdef0 = dir                                @@\
  93. XVARdef1 = sub                                @@\
  94. XVARdef2 = list                                @@\
  95.                                     @@\
  96. step:: $(XVARuse2:/=\)                            @@\
  97.     cd $(XVARuse0:/=\)                        @@\
  98.     !RemoveFile($**)                        @@\
  99.     !$(LN) $(XVARuse1:/=\)\\$** .
  100.  
  101. #define LinkRule(program,options,objects,libraries) \
  102. $(CCLINK) Concat(-Fe,program) options objects libraries $(EXTRA_LOAD_FLAGS)
  103.  
  104. #define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs)    @@\
  105. XVARdef0 = objects                            @@\
  106.                                     @@\
  107. ProgramTargetName(program): $(XVARuse0:.o=.obj) deplibs            @@\
  108.     RemoveTargetProgram($@)                        @@\
  109.     LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),locallibs $(LDLIBS) syslibs) @@\
  110.                                     @@\
  111. clean::                                    @@\
  112.     RemoveFile(ProgramTargetName(program))
  113.  
  114. #define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib)    @@\
  115. ProgramTargetName(program): $(objs:.o=.obj) $(deplib)            @@\
  116.     RemoveTargetProgram($@)                        @@\
  117.     LinkRule($@,$(LDOPTIONS),$(objs:.o=.obj),locallib $(LDLIBS) syslib) @@\
  118.                                     @@\
  119. InstallProgram(program,$(BINDIR))                    @@\
  120. InstallManPage(program,$(MANDIR))
  121.  
  122. #define ComplexProgramTarget(program)                    @@\
  123. PROGRAM = ProgramTargetName(program)                    @@\
  124.                                     @@\
  125. AllTarget(ProgramTargetName(program))                    @@\
  126.                                     @@\
  127. ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
  128.                                     @@\
  129. DependTarget()                                @@\
  130. LintTarget()                                @@\
  131.                                     @@\
  132. clean::                                    @@\
  133.     RemoveFile($(PROGRAM))
  134.  
  135. #define ComplexProgramTarget_1(program,locallib,syslib)            @@\
  136. OBJS = $(OBJS1) $(OBJS2) $(OBJS3)                    @@\
  137. SRCS = $(SRCS1) $(SRCS2) $(SRCS3)                    @@\
  138. PROGRAM1 = ProgramTargetName(program)                    @@\
  139.                                     @@\
  140. AllTarget($(PROGRAM1) $(PROGRAM2) $(PROGRAM3))                @@\
  141.                                     @@\
  142. ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib)    @@\
  143.                                     @@\
  144. DependTarget()                                @@\
  145. LintTarget()                                @@\
  146.                                     @@\
  147. clean::                                    @@\
  148.     for %%i in ($(PROGRAMS)) do $(RM) ProgramTargetName(%%i)
  149.  
  150. #define ComplexProgramTarget_2(program,locallib,syslib)            @@\
  151. PROGRAM2 = ProgramTargetName(program)                    @@\
  152.                                     @@\
  153. ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
  154.  
  155. #define ComplexProgramTarget_3(program,locallib,syslib)            @@\
  156. PROGRAM3 = ProgramTargetName(program)                    @@\
  157.                                     @@\
  158. ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
  159.  
  160. #define MoveToBakFile(file) -@if exist file $(MV) file file.bak
  161.  
  162. #define RMoveToBakFile(file) -RemoveFile(file.bak)            @@\
  163.     -@if exist file $(MV) file file.bak
  164.  
  165. #define InstallMultipleDestFlags(step,list,dest,flags)            @@\
  166. XVARdef0 = $(DESTDIR)dest                        @@\
  167.                                     @@\
  168. step:: list                                @@\
  169.     MakeDir($(XVARuse0:/=\))                    @@\
  170.     !$(INSTALL) $(INSTALLFLAGS) flags $** $(XVARuse0:/=\)
  171.  
  172. #define    CleanTarget()                            @@\
  173. clean::                                    @@\
  174.     RemoveFiles(FilesToClean ExtraFilesToClean)
  175.  
  176. #define LibraryTargetName(libname)libname.lib
  177.  
  178. #define LibraryTargetNameSuffix(libname,suffix)Concat(libname,suffix.lib)
  179.  
  180. #define MakeLibrary(libname,objlist) $(AR) @<<                @@\
  181. -out:libname objlist                            @@\
  182. <<
  183.  
  184. #define LinkSourceFile(src,dir)                        @@\
  185. XVARdef0 = dir/src                            @@\
  186.                                     @@\
  187. src:  $(XVARuse0:/=\)                            @@\
  188.     RemoveFile($@)                            @@\
  189.     $(LN) $? $@                            @@\
  190.                                     @@\
  191. includes:: src                                @@\
  192.                                     @@\
  193. depends:: src                                @@\
  194.                                     @@\
  195. clean::                                    @@\
  196.     RemoveFile(src)
  197.  
  198. #define LinkFile(tofile,fromfile)                    @@\
  199. XVARdef0 = fromfile                            @@\
  200. tofile:: $(XVARuse0:/=\)                        @@\
  201.     RemoveFile($@)                            @@\
  202.     $(LN) $? $@                            @@\
  203.                                     @@\
  204. includes:: tofile                            @@\
  205.                                     @@\
  206. depend:: tofile                                @@\
  207.                                     @@\
  208. clean::                                    @@\
  209.     RemoveFile(tofile)
  210.  
  211.  
  212. #define    NormalLibraryTarget(libname,objlist)                @@\
  213. AllTarget(LibraryTargetName(libname))                    @@\
  214.                                     @@\
  215. XVARdef0 = objlist                            @@\
  216.                                     @@\
  217. LibraryTargetName(libname): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS)    @@\
  218.     RemoveFile($@)                            @@\
  219.     MakeLibrary($@,$(XVARuse0:.o=.obj))                @@\
  220.     LinkBuildLibrary($@)
  221.  
  222. #define    NormalLibraryTarget2(libname,objlist1,objlist2)            @@\
  223. NormalLibraryTarget(libname,objlist1 objlist2)
  224.  
  225. #define    NormalLibraryTarget3(libname,objlist1,objlist2,objlist3)    @@\
  226. NormalLibraryTarget(libname,objlist1 objlist2 objlist3)
  227.  
  228. #define    NormalDepLibraryTarget(libname,deplist,objlist)            @@\
  229. AllTarget(LibraryTargetName(libname))                    @@\
  230.                                     @@\
  231. XVARdef0 = deplist                            @@\
  232. XVARdef1 = objlist                            @@\
  233. XVARdef2 = $(XVARuse1:/=\)                        @@\
  234.                                     @@\
  235. LibraryTargetName(libname): $(XVARuse0:/=\) $(EXTRALIBRARYDEPS)        @@\
  236.     RemoveFile($@)                            @@\
  237.     MakeLibrary($@,$(XVARuse2:.o=.obj))                @@\
  238.     LinkBuildLibrary($@)
  239.  
  240. #define    ProfiledLibraryTarget(libname,objlist)                @@\
  241. AllTarget(LibraryTargetNameSuffix(libname,_p))                @@\
  242.                                     @@\
  243. XVARdef0 = objlist                            @@\
  244.                                     @@\
  245. LibraryTargetNameSuffix(libname,_p): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS)    @@\
  246.     RemoveFile($@)                            @@\
  247.     cd profiled                            @@\
  248.     MakeLibrary(..\$@,$(XVARuse0:.o=.obj))                @@\
  249.     cd ..
  250.  
  251. #define    DebuggedLibraryTarget(libname,objlist)                @@\
  252. AllTarget(LibraryTargetNameSuffix(libname,_d))                @@\
  253.                                     @@\
  254. XVARdef0 = objlist                            @@\
  255.                                     @@\
  256. LibraryTargetNameSuffix(libname,_d): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS)    @@\
  257.     RemoveFile($@)                            @@\
  258.     cd debugger                            @@\
  259.     MakeLibrary(..\$@,$(XVARuse0:.o=.obj))                @@\
  260.     cd ..
  261.  
  262. #ifndef UseInstalled
  263. #define ImakeDependency(target)                        @@\
  264. target:: ProgramTargetName($(IMAKE))                    @@\
  265.                                     @@\
  266. ProgramTargetName($(IMAKE)):                        @@\
  267.     <<tmp.bat                            @@\
  268.     cd $(IMAKESRC:/=\)                        @@\
  269.     if exist Makefile $(MAKE) all                    @@\
  270.     if not exist Makefile $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)" @@\
  271. <<
  272. #endif
  273.  
  274. #ifndef UseInstalled
  275. #define DependDependency()                         @@\
  276. depend:: ProgramTargetName($(DEPEND))                    @@\
  277.                                     @@\
  278. ProgramTargetName($(DEPEND)):                        @@\
  279.     <<tmp.bat                            @@\
  280.     cd $(DEPENDSRC:/=\)                        @@\
  281.     $(MAKE)                                @@\
  282. <<
  283. #endif
  284.  
  285. #define    DependTarget()                            @@\
  286. DependDependency()                            @@\
  287.                                     @@\
  288. depend::                                @@\
  289.     $(DEPEND:/=\) @<<                        @@\
  290. $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)        @@\
  291. <<
  292.  
  293. #define    DependTarget3(srcs1,srcs2,srcs3)                @@\
  294. DependDependency()                            @@\
  295.                                     @@\
  296. depend::                                @@\
  297.     $(DEPEND:/=\) @<<                        @@\
  298. $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 srcs2 srcs3    @@\
  299. <<
  300.  
  301. #define ForceSubdirs(dirs)                        @@\
  302. Avoid.Error dirs: FRC                            @@\
  303.     @cd $@                                @@\
  304.     @echo making all in $(CURRENT_DIR)/$@...            @@\
  305.     $(MAKE) $(MFLAGS) PassCDebugFlags all                @@\
  306.     cd ..                                @@\
  307.                                     @@\
  308. FRC:
  309.  
  310. #define MakeMakeSubdirs(dirs,target)                    @@\
  311. XVARdef0 = dirs                                @@\
  312. XVARdef1 = $$                                @@\
  313.                                     @@\
  314. target::                                @@\
  315.     @$(MAKE) -A $(MFLAGS) -f <<                    @@\
  316. .SUFFIXES:                                @@\
  317.                                     @@\
  318. all: $(XVARuse0:/=\)                            @@\
  319.                                     @@\
  320. Avoid.Error $(XVARuse0:/=\):                        @@\
  321.     cd $(XVARuse1)@                            @@\
  322.     RMoveToBakFile(Makefile)                    @@\
  323.     ImakeSubCmdHelper -DTOPDIR=../$(TOP) -DCURDIR=$(CURRENT_DIR)/$(XVARuse1)@ @@\
  324.     $(MAKE) $(MFLAGS) Makefiles                    @@\
  325.     cd ..                                @@\
  326. <<
  327.  
  328. #ifdef UseInstalled
  329. # define ImakeSubCmdHelper $(IMAKE_CMD)
  330. #else
  331. # define ImakeSubCmdHelper ..\$(IMAKE) -I../$(IRULESRC) \
  332.                $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
  333. #endif
  334.  
  335. #define NamedTargetSubdirs(name,dirs,verb,flags,subname)        @@\
  336. XVARdef0 = dirs                                @@\
  337. XVARdef1 = $$                                @@\
  338.                                     @@\
  339. name::                                    @@\
  340.     @$(MAKE) -A $(MFLAGS) -f <<                    @@\
  341. .SUFFIXES:                                @@\
  342.                                     @@\
  343. all: $(XVARuse0:/=\)                            @@\
  344.                                     @@\
  345. Avoid.Error $(XVARuse0:/=\):                        @@\
  346.     cd $(XVARuse1)@                            @@\
  347.     @echo verb in $(CURRENT_DIR)/$(XVARuse1)@...            @@\
  348.     $(MAKE) $(MFLAGS) flags subname                    @@\
  349.     cd ..                                @@\
  350. <<
  351.  
  352. #define UnsharedLibReferences(varname,libname,libsource)        @@\
  353. Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,libsource/,libname.lib) @@\
  354. Concat(varname,LIB) = LoaderLibPrefix _Use(libname.lib,$(Concat3(DEP,varname,LIB))) @@\
  355. LintLibReferences(varname,libname,libsource)
  356.  
  357. #define SharedLibReferences(varname,libname,libsource,revname,rev)    @@\
  358. revname = rev                                @@\
  359. UnsharedLibReferences(varname,libname,libsource)
  360.  
  361. #define    SubdirLibraryRule(objlist)                    @@\
  362. XVARdef0 = objlist                            @@\
  363.                                     @@\
  364. all:: DONE                                @@\
  365.                                     @@\
  366. DONE: $(XVARuse0:.o=.obj)                        @@\
  367.     RemoveFile($@)                            @@\
  368.     echo - > $@                            @@\
  369.                                     @@\
  370. clean::                                    @@\
  371.     RemoveFile(DONE)
  372.  
  373. #define CppScriptTarget(dst,src,defs,deplist)                @@\
  374. dst::                                    @@\
  375.     @echo sorry, unable to make $@
  376.  
  377. #define CppFileTarget(dst,src,defs,deplist)                @@\
  378. XFAKEVAR = X                                @@\
  379. dst::  src deplist                            @@\
  380.     RemoveFile($@)                            @@\
  381.     $(PREPROCESSCMD) -I. <<CppTmpFile.c @<< >$@            @@\
  382.     XCOMM define $(XFAKEVAR)COMM XCOMM                @@\
  383.     XCOMM include <src>                        @@\
  384. <<                                    @@\
  385.     defs                                @@\
  386. <<                                    @@\
  387.                                     @@\
  388. clean::                                    @@\
  389.     RemoveFiles(dst)
  390.  
  391. #define InstallNamedTarget(step,srcname,flags,dest,dstname)        @@\
  392. XVARdef0 = $(DESTDIR)dest                        @@\
  393.                                     @@\
  394. step:: srcname                                @@\
  395.     MakeDir($(XVARuse0:/=\))                    @@\
  396.     $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
  397.  
  398. #define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname)    @@\
  399. XVARdef0 = $(DESTDIR)dest                        @@\
  400.                                     @@\
  401. step:: srcname                                @@\
  402.     MakeDir($(XVARuse0:/=\))                    @@\
  403.     @if exist $(XVARuse0:/=\)\\dstname echo Not overwriting existing $(XVARuse0:/=\)\\dstname @@\
  404.     if not exist $(XVARuse0:/=\)\\dstname $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
  405.  
  406.  
  407. #define    InstallLibrary(libname,dest)                    @@\
  408. InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),dest)
  409.  
  410. #define    InstallScript(program,dest) /**/
  411.  
  412. #define    InstallNamedProg(srcname,dstname,dest)                @@\
  413. install:: srcname                            @@\
  414.     @echo sorry, unable to install srcname
  415.  
  416. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  417. InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
  418. InstallTarget(install,libname.dll,$(INSTLIBFLAGS),dest)
  419.  
  420. #define    InstallSharedLibraryData(libname,rev,dest)
  421.  
  422. #define MakeDLL(libname,solist) $(LD) @<<                @@\
  423. $(SHLIBLDFLAGS) -out:libname.dll libname.exp solist            @@\
  424. <<
  425.  
  426. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  427. AllTarget(libname.dll)                            @@\
  428.                                     @@\
  429. CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
  430.                                     @@\
  431. XVARdef0 = solist                            @@\
  432.                                     @@\
  433. LibraryTargetName(libname): $(XVARuse0:.o=.obj) libname.def $(EXTRALIBRARYDEPS)    @@\
  434.     RemoveFile($@)                            @@\
  435.     MakeLibrary($@,-def:libname.def $(XVARuse0:.o=.obj))        @@\
  436.     LinkBuildLibrary($@)                        @@\
  437.                                     @@\
  438. libname.dll: LibraryTargetName(libname) $(EXTRALIBRARYDEPS)        @@\
  439.     RemoveFile(libname.dll)                        @@\
  440.     MakeDLL(libname,$(XVARuse0:.o=.obj) $(REQUIREDLIBS) $(EXTRA_LIBRARIES)) @@\
  441.     LinkBuildDLL(libname.dll)                    @@\
  442.                                     @@\
  443. clean::                                    @@\
  444.     RemoveFile(LibraryTargetName(libname))                @@\
  445.     RemoveFile(libname.dll)
  446.  
  447. #define SharedLibraryDataTarget(libname,rev,salist)
  448.  
  449. #define ObjectCplusplusCompile(options) RemoveFile($@)            @@\
  450.     $(CXX) -c $*.CCsuf @<<                        @@\
  451.     $(CFLAGS) options                        @@\
  452. <<
  453.  
  454. #define CplusplusLinkRule LinkRule
  455.  
  456. #define CplusplusProgramTargetHelper ProgramTargetHelper
  457.  
  458. #ifndef ComplexCplusplusProgramTarget
  459. #define    ComplexCplusplusProgramTarget(program)                @@\
  460.         PROGRAM = ProgramTargetName(program)                @@\
  461.                                     @@\
  462. AllTarget(ProgramTargetName(program))                    @@\
  463.                                     @@\
  464. CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
  465.                                     @@\
  466. DependTarget()                                @@\
  467. LintTarget()                                @@\
  468.                                     @@\
  469. clean::                                    @@\
  470.     RemoveFile(ProgramTargetName(program))
  471. #endif /* ComplexCplusplusProgramTarget */
  472.  
  473. #ifndef UseInstalled
  474. # define LinkBuildDLL(binary) MakeDir($(BUILDBINDIR:/=\))        @@\
  475.     RemoveFile(Concat($(BUILDBINDIR:/=\)\,binary))            @@\
  476.     cd $(BUILDBINDIR:/=\) && $(LN) Concat($(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\,binary) .
  477.  
  478. # ifdef LinkBuildBinary
  479. #  undef LinkBuildBinary
  480. # endif
  481. # define LinkBuildBinary(binary)                    @@\
  482. all:: $(BUILDBINDIR)\ProgramTargetName(binary) ProgramTargetName(binary) @@\
  483.                                     @@\
  484. $(BUILDBINDIR)\ProgramTargetName(binary): ProgramTargetName(binary)    @@\
  485.     MakeDir($(BUILDBINDIR:/=\))                    @@\
  486.     RemoveFile($(BUILDBINDIR:/=\)\ProgramTargetName(binary)))    @@\
  487.     cd $(BUILDBINDIR:/=\) && $(LN) $(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\ProgramTargetName(binary) .
  488.  
  489. # ifdef LinkBuildLibrary
  490. #  undef LinkBuildLibrary
  491. # endif
  492. # define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR:/=\))        @@\
  493.     RemoveFile(Concat($(BUILDLIBDIR:/=\)\,lib))            @@\
  494.     cd $(BUILDLIBDIR:/=\) && $(LN) Concat($(BUILDLIBTOP:/=\)\$(CURRENT_DIR:/=\)\,lib) .
  495.  
  496. #endif
  497.  
  498. #ifndef ProjectUnsharedLibReferences
  499. #define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
  500. Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/lib,buildlibdir/,libname.lib)    @@\
  501. Concat(varname,LIB) = $(Concat3(DEP,varname,LIB))            @@\
  502. LintLibReferences(varname,libname,libsource)
  503. #endif
  504.  
  505.  
  506. /*
  507.  * ServerTargetWithFlags - generate rules to compile, link, and relink a server
  508.  */
  509. #ifndef ServerTargetWithFlags
  510. #define    ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
  511. XVARdef0 = objects                            @@\
  512.                                     @@\
  513. AllTarget(ProgramTargetName(server))                    @@\
  514. ProgramTargetName(server): subdirs $(XVARuse0:.o=.obj) libs        @@\
  515.     MoveToBakFile($@)                        @@\
  516.     LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
  517.                                     @@\
  518. Concat(load,server):                            @@\
  519.     MoveToBakFile(ProgramTargetName(server))            @@\
  520.     LinkRule(ProgramTargetName(server),$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
  521.                                     @@\
  522. loadX:: Concat(load,server)                        @@\
  523.                                     @@\
  524. ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
  525. ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
  526.                                     @@\
  527. InstallProgramWithFlags(server,$(BINDIR),flags)                @@\
  528.                                     @@\
  529. clean::                                    @@\
  530.     RemoveFile(ProgramTargetName(server))
  531. #endif /* ServerTargetWithFlags */
  532.